# -*- coding: utf-8 -*-

"""
Created on 11/17/2021
gogogo.
@author: Kang Xiatao (kangxiatao@gmail.com)
"""
from copy import deepcopy

"""
nohup python gogogo.py > results/gogogo.txt 2>&1 &
CUDA_VISIBLE_DEVICES=0 nohup python gogogo.py > /dev/null 2>&1 &
"""

import os
import time

print('gogogo')

def run_fun(cmd='', run_check=False):
    while True:
        start_time = time.time()
        print(cmd)
        os.system(cmd)
        if not run_check:
            break
        if time.time() - start_time > 600:  # 至少十分钟
            break
    time.sleep(1 * 60)


run_fun("python src/main.py --config=InSPO --env-config=sc2 with env_args.map_name=6h_vs_8z h5file_suffix=medium agent=sep_rnn cql_coeff=2 alpha_start=5 alpha_end=5 entropy_coef_start=0 entropy_coef_end=0 actor_lr=0.0005 critic_lr=0.0001 gae_lambda=0.8 softmax_temp=100 IS_ratio_min=0.5 IS_ratio_max=5 use_orthogonal=False use_td_lambda=False use_gae=True other_policy_pow=1 auto_alpha=True alpha_lr=0.0005 target_KL=0.18 test_episode_32=True seed=0 t_max=3000000")


